
package com.xbongbong.message.domain.entity;

import com.xbongbong.paas.toolbox.util.DateTimeUtil;
import com.xbongbong.paas.toolbox.wrap.Entity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

/**
 * PushLinkEntity
 *
 * @author GuoJun.HU
 * @since V1.0
 * @date 2019/2/19 10:48
 */
@Getter
@Setter
@ToString
public class PushLinkEntity extends Entity {

    /**
     * Comment for <code>serialVersionUID</code>
     */
    private static final long serialVersionUID = -1L;

    public PushLinkEntity() {
        updateTime = DateTimeUtil.getInt();
        addTime = DateTimeUtil.getInt();
        isRead = 0;
        del = 0;
    }

    public PushLinkEntity(String corpid, String userId, Long pushId, Integer refEntity, Long refId, Integer isRemind, Long pushTime) {
        this();
        this.corpid = corpid;
        this.userId = userId;
        this.pushId = pushId;
        this.refEntity = refEntity;
        this.refId = refId;
        this.isRemind = isRemind;
        this.pushTime = pushTime;
    }

    //========== properties ==========

    /**
     * 消息关联 主键 ID
     */
    private Long id;
    /**
     * 公司 ID 主键
     */
    private String corpid;
    /**
     * 用户 ID 主键
     */
    private String userId;
    /**
     * 消息 主键 ID
     */
    private Long pushId;
    /**
     * 消息对象类型，查 RefEntityEnum
     */
    private Integer refEntity;
    /**
     * 对象Id
     */
    private Long refId;
    /**
     * 是否 已读
     */
    private Integer isRead;
    /**
     * 是否为跟进提醒（冗余tb_push字段）,0：普通消息；1：跟进提醒
     */
    private Integer isRemind;
    /**
     * 推送时间
     */
    private Long pushTime;
    /**
     * 创建时间
     */
    private Long addTime;
    /**
     * 修改时间
     */
    private Long updateTime;
    /**
     * 是否 删除
     */
    private Integer del;

}

